//
//  XMGMonthItem.m
//  码哥课堂
//
//  Created by yz on 2016/12/3.
//  Copyright © 2016年 yz. All rights reserved.
//

#import "XMGMonthItem.h"
#import "XMGDayItem.h"
#import <MJExtension.h>


@implementation XMGMonthItem

- (void)setData:(NSArray *)data
{
    
    // 创建记录所有周数组
    NSMutableArray *weeks = [NSMutableArray array];
    
    for (NSArray *weekDay in data) {
        // 保存一周的天模型
        NSMutableArray *week = [NSMutableArray array];
        
        for (NSDictionary *dayDict in weekDay) {
          XMGDayItem *item = [XMGDayItem mj_objectWithKeyValues:dayDict];
            [week addObject:item];
        }
        
        [weeks addObject:week];
        
    }
    
    _data = weeks;
}

@end
